import request from '@/utils/request'

// 查询劳务分包列表
export function listSubcontract(query) {
  return request({
    url: '/system/subcontract/list',
    method: 'get',
    params: query
  })
}

// 查询劳务分包详细
export function getSubcontract(id) {
  return request({
    url: '/system/subcontract/' + id,
    method: 'get'
  })
}

// 新增劳务分包
export function addSubcontract(data) {
  return request({
    url: '/system/subcontract',
    method: 'post',
    data: data
  })
}

// 修改劳务分包
export function updateSubcontract(data) {
  return request({
    url: '/system/subcontract',
    method: 'put',
    data: data
  })
}

// 删除劳务分包
export function delSubcontract(id) {
  return request({
    url: '/system/subcontract/' + id,
    method: 'delete'
  })
}

// 导出劳务分包
export function exportSubcontract(query) {
  return request({
    url: '/system/subcontract/export',
    method: 'get',
    params: query
  })
}


export function submitAgain(data) {
  return request({
    url: '/system/subcontract/submitAgain',
    method: 'post',
    data: data
  })
}


export function reject(data) {
  return request({
    url: '/system/subcontract/reject',
    method: 'post',
    data: data
  })
}

export function agree(data) {
  return request({
    url: '/system/subcontract/agree',
    method: 'post',
    data: data
  })
}